<include file="public/layout" />
<script type="text/javascript">
    window.UEDITOR_Admin_URL = "/public/plugins/Ueditor/";
    var URL_upload = "/index.php/admin/Ueditor/imageUp/savepath/goods.html";
    var URL_fileUp = "/index.php/admin/Ueditor/fileUp/savepath/article.html";
    var URL_scrawlUp = "/index.php/admin/Ueditor/scrawlUp/savepath/article.html";
    var URL_getRemoteImage = "/index.php/admin/Ueditor/getRemoteImage/savepath/article.html";
    var URL_imageManager = "/index.php/admin/Ueditor/imageManager/savepath/article.html";
    var URL_imageUp = "/index.php/admin/Ueditor/imageUp/savepath/article.html";
    var URL_getMovie = "/index.php/admin/Ueditor/getMovie/savepath/article.html";
    var URL_home = "";    
</script>
<load href="__ROOT__/public/plugins/Ueditor/ueditor.config.js"/>
<load href="__ROOT__/public/plugins/Ueditor/ueditor.all.js"/>
<script src="__ROOT__/public/static/js/layer/laydate/laydate.js"></script>
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
      <div class="subject">
        <h3>白酒文化 - 添加修改视频</h3>
        <h5>添加或编辑视频</h5>
      </div>
    </div>
  </div>
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span id="explanationZoom" title="收起提示"></span>
    </div>
    <ul>
      <li>请不要误删除分类信息，不可恢复</li>
    </ul>
  </div>
  <form action="{:U('Cellar/addeditCulture')}" method="post" class="form-horizontal" id="category_form">
    <div class="ncap-form-default">
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>视频名称</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="名称" class="input-txt" name="title" value="{$culture.title}">
        </dd>
      </dl>
	  <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>视频URL地址</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="视频源地址" class="input-txt" name="videourl" value="{$culture.videourl}">
          <span class="err" id="err_name" style="color:#F00; display:none;"></span>
          <p class="notic"></p>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">视频封面图片</dt>
        <dd class="opt">
          <div class="input-file-show" id="divComUploadContainer">
            <span class="show">
                <a class="nyroModal" rel="gal" href="{$culture.thumbnail}">
                    <i class="fa fa-picture-o" onmouseover="layer.tips('<img src={$culture.thumbnail}>',this, {tips: [1, '#fff']});" onmouseout="layer.closeAll();"></i>
                </a>
            </span>           
            <span class="type-file-box">            
            <input type="text" id="imagetext" name="thumbnail" value="{$culture.thumbnail}" class="type-file-text">            
            <input type="button" class="type-file-button" onClick="GetUploadify(1,'imagetext','category','')" value="上传图片" hidefocus="true" nc_type="change_site_logo" title="点击前方预览图可查看大图，点击按钮选择文件并提交表单后上传生效"/> 
            </span>
          </div>
          <div id="thumbnails" class="ncap-thumb-list">
            <h5><i class="fa fa-exclamation-circle"></i> 请上传图片格式文件。</h5>
            <ul>
            </ul>
          </div>
        </dd>
      </dl> 
      <dl class="row">
			<dt class="tit">图片文字说明</dt>
			<dd class="opt">          
            <textarea class="span12 ckeditor" id="post_content" name="content" title="">
                {$culture.content}
            </textarea>          
          <span class="err"></span>
          <p class="notic"></p>
        </dd>
	  </dl>
	  <if !empty($culture)>
	    <input name="id" value="{$culture.id}" type="hidden" />
	  </if>
      <div class="bot"><a id="submitBtn" class="ncap-btn-big ncap-btn-green" href="JavaScript:void(0);" onClick="ajax_submit_form('category_form','{:U('Cellar/addeditCulture?is_ajax=1')}');">确认提交</a></div>
   </div>
  </form>
</div>
    
<script type="text/javascript">
    var editor;
    $(function () {
        //具体参数配置在  editor_config.js 中
        var options = {
            zIndex: 999,
            initialFrameWidth: "70%", //初化宽度
            initialFrameHeight: 300, //初化高度            
            focus: false, //初始化时，是否让编辑器获得焦点true或false
            maximumWords: 99999, removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
            pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴，true为使用纯文本粘贴
            autoHeightEnabled: true
         /*   autotypeset: {
                mergeEmptyline: true,        //合并空行
                removeClass: true,           //去掉冗余的class
                removeEmptyline: false,      //去掉空行
                textAlign: "left",           //段落的排版方式，可以是 left,right,center,justify 去掉这个属性表示不执行排版
                imageBlockLine: 'center',    //图片的浮动方式，独占一行剧中,左右浮动，默认: center,left,right,none 去掉这个属性表示不执行排版
                pasteFilter: false,          //根据规则过滤没事粘贴进来的内容
                clearFontSize: false,        //去掉所有的内嵌字号，使用编辑器默认的字号
                clearFontFamily: false,      //去掉所有的内嵌字体，使用编辑器默认的字体
                removeEmptyNode: false,      //去掉空节点
                                             //可以去掉的标签
                removeTagNames: {"font": 1},
                indent: false,               // 行首缩进
                indentValue: '0em'           //行首缩进的大小
            }*/
        };
        editor = new UE.ui.Editor(options);
        editor.render("post_content");
     
    });
    
</script>
</body>
</html>